#-----------------------------------------------------------------------------
#
# GROKConfig.cmake - CMake configuration file for external projects.
#
# This file is configured by GROK and used by the UseGROK.cmake
# module to load GROK's settings for an external project.
@GROK_CONFIG_INSTALL_ONLY@
# The GROK version number.
set(GROK_MAJOR_VERSION "@GROK_VERSION_MAJOR@")
set(GROK_MINOR_VERSION "@GROK_VERSION_MINOR@")
set(GROK_BUILD_VERSION "@GROK_VERSION_BUILD@")

# The libraries.
set(GROK_LIBRARIES "@GROK_LIBRARY_NAME@")

# The CMake macros dir.
set(GROK_CMAKE_DIR "@GROK_INSTALL_PACKAGE_DIR@")

# The configuration options.
set(GROK_BUILD_SHARED_LIBS "@BUILD_SHARED_LIBS@")

# The "use" file.
set(GROK_USE_FILE "@GROK_USE_FILE_CONFIG@")

get_filename_component(SELF_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)
if(EXISTS ${SELF_DIR}/GrokTargets.cmake)
  # This is an install tree
  include(${SELF_DIR}/GrokTargets.cmake)
  get_filename_component(GROK_INCLUDE_ROOT "${SELF_DIR}/../../../@CMAKE_INSTALL_INCLUDEDIR@" ABSOLUTE)
  set(GROK_INCLUDE_DIRS ${GROK_INCLUDE_ROOT})

else()
  if(EXISTS ${SELF_DIR}/GrokExports.cmake)
    # This is a build tree
    set( GROK_INCLUDE_DIRS @GROK_INCLUDE_PATH@)

    include(${SELF_DIR}/GrokExports.cmake)

  else()
    message(FATAL_ERROR "ooops")
  endif()
endif()

set(GROK_USE_FILE ${SELF_DIR}/UseGROK.cmake)

# Backward compatible part:
set(GROK_FOUND       TRUE)

